﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
                    xmlns:uriMapper="clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Brushes.xaml" />
        <ResourceDictionary Source="CoreStyles.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <Style x:Key="PageStyle" TargetType="navigation:Page">
        <Setter Property="FontFamily" Value="Microsoft YaHei UI Light" />
        <Setter Property="FontSize" Value="14" />
    </Style>

    <Style x:Key="PageScrollViewerStyle" TargetType="ScrollViewer">
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0,1,0,1" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="HorizontalScrollBarVisibility" Value="Auto" />
    </Style>

    <Style x:Key="HeaderTextStyle" TargetType="TextBlock">
        <Setter Property="Foreground" Value="{StaticResource NavigationForegroundColorBrush}" />
        <Setter Property="FontFamily" Value="{StaticResource HeadingFontFamily}" />
        <Setter Property="FontSize" Value="{StaticResource Heading1FontSize}" />
        <Setter Property="FontWeight" Value="Light" />
        <Setter Property="TextWrapping" Value="Wrap" />
        <Setter Property="Margin" Value="0,15,0,40" />
        <Setter Property="HorizontalAlignment" Value="Left" />
    </Style>

    <Style x:Key="ContentTextStyle" TargetType="TextBlock">
        <Setter Property="Foreground" Value="{StaticResource NavigationForegroundColorBrush}" />
        <Setter Property="FontFamily" Value="{StaticResource ContentFontFamily}" />
        <Setter Property="FontSize" Value="{StaticResource ContentFontSize}" />
        <Setter Property="TextWrapping" Value="Wrap" />
        <Setter Property="Margin" Value="0,2,0,2" />
        <Setter Property="HorizontalAlignment" Value="Left" />
    </Style>

    <Style x:Key="HeaderApplicationStyle"
           BasedOn="{StaticResource Heading3}"
           TargetType="TextBlock">
        <Setter Property="FontWeight" Value="ExtraLight"/>
        <Setter Property="Foreground" Value="{StaticResource NormalFontBrush}"/>
        <Setter Property="Effect">
            <Setter.Value>
                <DropShadowEffect BlurRadius="1"
                                  Direction="-90"
                                  Opacity="0.5"
                                  ShadowDepth="1"
                                  Color="{StaticResource ColorForegroundShadowColor}" />
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="BreakLineStyle" TargetType="Rectangle">
        <Setter Property="Height" Value="1" />
        <Setter Property="Fill" Value="{StaticResource ControlForeground}" />
        <Setter Property="Effect">
            <Setter.Value>
                <DropShadowEffect BlurRadius="1"
                                  Direction="-90"
                                  Opacity="0.5"
                                  ShadowDepth="1"
                                  Color="{StaticResource ColorForegroundShadowColor}" />
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ContentFrameStyle" TargetType="navigation:Frame">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="Padding" Value="0,0" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    </Style>

    <Style x:Key="NavContentFrameStyle"
           BasedOn="{StaticResource ContentFrameStyle}"
           TargetType="navigation:Frame">
        <Setter Property="UriMapper">
            <Setter.Value>
                <uriMapper:UriMapper>
                    <uriMapper:UriMapping MappedUri="/Views/Home.xaml" Uri="" />
                    <uriMapper:UriMapping MappedUri="/Views/{pageName}.xaml" Uri="/{pageName}" />
                    <uriMapper:UriMapping MappedUri="/Views/Device/{pageName}.xaml" Uri="/Device/{pageName}" />
                    <uriMapper:UriMapping MappedUri="/Views/Users/{pageName}.xaml" Uri="/Users/{pageName}" />
                    <uriMapper:UriMapping MappedUri="/Views/{pageName}/Default.xaml" Uri="/{pageName}/" />
                </uriMapper:UriMapper>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="NoframeListboxStyle" TargetType="ListBox">
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Background" Value="Transparent" />
    </Style>

</ResourceDictionary>
